<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>二维码显示和隐藏</title>
    <style>
      a {
        width: 160px;
        height: 35px;
        text-decoration: none;
        color: #fff;
        font-weight: bolder;
        text-align: center;
        line-height: 35px;
        background-color: #ff5900;
        display: block;
      }

      img {
        display: none;
      }

      a:hover + img {
        display: block;
      }
    </style>
  </head>
  <body>
    <a href="#">淘宝</a>
    <img
      src=""
      alt=""
    />
  </body>
</html>
